package org.wk.logger.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.wk.core.common.view.PageVo;
import org.wk.core.common.view.ResponseVo;
import org.wk.logger.common.annotation.SysLog;
import org.wk.logger.service.LogService;

import java.util.Map;

/*
 * @ClassName LoggerController
 * @Description     系统日志管理
 * @Author ZhaoPing'an
 * @Date 2018/7/24 15:37
 */
@RestController
@RequestMapping("/sys/logger")
public class LoggerController {

    @Autowired
    private LogService logService;

    @SysLog("资讯管理列表")
    @RequestMapping("/list")
    public ResponseVo list(@RequestParam Map<String, Object> params){
        PageVo page = logService.findLogListPage(params);
        return ResponseVo.success().addAttribute("page", page);
    }
}
